package com.shitou.shitouproduct.service.impl;

import com.shitou.shitouproduct.entity.SpuInfoEntity;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shitou.shitoucommons.utils.PageUtils;
import com.shitou.shitoucommons.utils.Query;

import com.shitou.shitouproduct.dao.SkuInfoDao;
import com.shitou.shitouproduct.entity.SkuInfoEntity;
import com.shitou.shitouproduct.service.SkuInfoService;


@Service("skuInfoService")
public class SkuInfoServiceImpl extends ServiceImpl<SkuInfoDao, SkuInfoEntity> implements SkuInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SkuInfoEntity> page = this.page(
                new Query<SkuInfoEntity>().getPage(params),
                new QueryWrapper<SkuInfoEntity>()
        );
        return new PageUtils(page);
    }


    @Override
    public SkuInfoEntity insert(SkuInfoEntity skuInfoEntity){
        baseMapper.insert(skuInfoEntity);
        return skuInfoEntity;
    }


}
